/**
 *
 */
package com.aulac.commons.license.client;

import java.io.FileNotFoundException;
import java.io.InputStream;

import de.schlichtherle.util.ObfuscatedString;

/**
 *
 * This is a version of my "Hyde" class with all of the code removed except that
 * which applies to the True License Java License Manager code.
 *
 * Note that it implements the "LicenseableClass", which is an interface I
 * created as I started thinking that I wanted to re-use my LicenseController
 * class in other Java/Swing applications.
 *
 * Note: With all the guts torn out of this class it will not compile, but
 * hopefully it can help you see how to implement the True License code in your
 * client application.
 *
 * @author Ngo Thanh Loi
 *
 */
public class Hyde implements LicenseableClass {
	// "please license" dialog stuff
	private static final String LICENSE_DIALOG_TITLE = "devdaily.com - Hyde";
	private LicenseController licenseController;
	private int numTimesUsed;

	private boolean licenseWasSuccessfullyApplied;

	// license stuff - uses the ObfuscatedString class from the True License
	// library
	private static String keystoreFilename = new ObfuscatedString(new long[] {
			0x2531E65E362C302AL, 0xC6491960E7CAB920L, 0xC3BA520AAFF63939L })
			.toString(); /* => "dc.properties" */
	private static String alias = new ObfuscatedString(new long[] {
			0xDE2992A6F9C3C3A1L, 0xA08CA77A6F05791AL, 0x59E2378BA6F1BA96L })
			.toString(); /* => "dcpublickey" */
	private static String publicCertStorePassword = new ObfuscatedString(
			new long[] { 0x43426A6C456239FAL, 0x98099DA1F000C879L,
					0x4B8DCA266320210EL, 0xC13BE948052C1673L }).toString(); /*
																			 * =>
																			 * "Z3N H4ND M00N 6590"
																			 */
	private static String cipherParamPassword = new ObfuscatedString(
			new long[] { 0xCF899EE49F709ACAL, 0x954921EB531BF4BFL,
					0x3D73B0811299826DL }).toString(); /* => "d0sxxb33rm3si" */

	// ftp license stuff - uses the ObfuscatedString class from the True License
	// library
	private static String ftpAlias = new ObfuscatedString(new long[] {
			0xA4B0FBA523B3F63AL, 0x65D5A72B8657E00BL, 0x9E71F6D2395FF6FL })
			.toString(); /* => "dcftpkeyv1.x" */
	private static String ftpKeyPwd = new ObfuscatedString(new long[] {
			0xA2B75E0F17691BD4L, 0xEB9DB7C881078526L, 0x5ED8D7B254BC11BEL,
			0x4422FAD5CD5DC734L }).toString(); /* => "J4V D3RB 88743 1411" */

	// prompt user for a license filename when they're ready to license
	private String licenseFilename;

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.aulac.commons.license.client.LicenseableClass#getApplicationName()
	 */
	public String getApplicationName() {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.aulac.commons.license.client.LicenseableClass#
	 * getPublicKeystoreAsInputStream()
	 */
	public InputStream getPublicKeystoreAsInputStream()
			throws FileNotFoundException {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.aulac.commons.license.client.LicenseableClass#getAlias()
	 */
	public String getAlias() {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.aulac.commons.license.client.LicenseableClass#getPublicKeystorePassword
	 * ()
	 */
	public String getPublicKeystorePassword() {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.aulac.commons.license.client.LicenseableClass#getCipherParamPassword
	 * ()
	 */
	public String getCipherParamPassword() {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.aulac.commons.license.client.LicenseableClass#getClassToLicense()
	 */
	public Class getClassToLicense() {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.aulac.commons.license.client.LicenseableClass#
	 * handleVerifyLicenseFailedEvent()
	 */
	public void handleVerifyLicenseFailedEvent() {
		// TODO Auto-generated method stub

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.aulac.commons.license.client.LicenseableClass#getFtpAlias()
	 */
	public String getFtpAlias() {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.aulac.commons.license.client.LicenseableClass#getFtpKeyPwd()
	 */
	public String getFtpKeyPwd() {
		// TODO Auto-generated method stub
		return null;
	}

}
